<?php
use think\Route;
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
//Route::get("/[:a]$","index/index/index");
 Route::get('new/:id',function($id){
	 return $id;
 }); // 定义GET请求路由规则
 Route::get('index$','index/index/da');
// Route::post('new/:id','News/update'); // 定义POST请求路由规则
// Route::put('new/:id','News/update'); // 定义PUT请求路由规则
// Route::delete('new/:id','News/delete'); // 定义DELETE请求路由规则
// Route::any('new/:id','News/read'); // 所有请求都支持的路由规则
//[:a]可选路由 $路由完全匹配
//Route.rule['new/:id'=>'','']
// 定义路由配置文件（数组）
//'route_config_file' =>  ['route', 'route1', 'route2'],
//Route::controller('pass',"index/da");//控制器方法路由
//Route::pattern('name','\d+');//route::pattern(['name'=>'\d+'])
//Route::alias("pass","index/index/da");//可用别名调用模块控制器方法
//Route::group('index',[':id'=>['index/index/index',['method'=>'get'],['id'=>'\d+']]]);

return [
	'create/admin'=>'index/Shop/create'
	//'new/:id'=>'@index/index/pr',
	//'/:name'=>'https://www.kancloud.cn/manual/thinkphp5/118037'
	//'/:name'=>'index/index/index?a=:name',//是模块控制器方法带的形参不同于url的get请求参数
	//http://localhost/tp5/publica/2?b=1
	// '__rest__'=>[
	//         // 指向index模块的blog控制器
	      
	// 	   '/index'=>'index/index'//restful api设计
			
	//     ],
		//'index/:id'=>['index/index/index',['method'=>'get'],['id'=>'\d+']],
		// 'index/:name'=>['index/index/da',['method'=>'get'],['id'=>'\w+']],
		// '[index]'=>[//分组
		// 	':id'=>['index/index/index',['method'=>'get'],['id'=>'\d+']]
		// ]
];
//可以路由模块加载带get参数